//
//  AppDelegate.m
//  CZOC微博01
//
//  Created by 1 on 15/11/23.
//  Copyright © 2015年 itcast. All rights reserved.
//

#import "AppDelegate.h"
#import "CZTabbarController.h"
#import "CZFeatherViewController.h"
#import "CZOAuthViewController.h"
#import "CZAccount.h"
#import  "CZAccountTool.h"
#import  "UIWindow+CZExtenWindow.h"
@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
 
    /*
     
     App Key：2937002258
     App Secret：ba012485e967094bac039790e5edec50
     
     
     */
    
  
       
      //穿阿金一个窗口
    self.window=[[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
    //判断是否已经登录
 
    //设置自控制器
    
  

    CZAccount *account=[CZAccountTool account];
    if(account)
     {
         
         //判断版本的号
         //切换控制器
         [self.window switchRootViewController];
         
     }
    else
    {
          CZOAuthViewController *oAuthView=[[CZOAuthViewController alloc]init];
       
        self.window.rootViewController=oAuthView;
        
    
    }
   
      [self.window makeKeyAndVisible];
    return YES;
}





@end
